from flask import Blueprint, render_template, redirect

from service.FriendLinkService import get_publish_friend_link
from util.LoginUtil import get_login_info

view_contact = Blueprint('view_contact', __name__)
view_contact.url_prefix = '/view'


@view_contact.route('/contact')
def index():
    friend_links = get_publish_friend_link()
    login_info = get_login_info()
    # partner_comment, child_comments = get_contact_comment()
    if login_info == {}:
        login_info['is_login'] = False
    else:
        login_info['is_login'] = True
    return render_template('public/style1/contact.html', friend_links=friend_links, login_info=login_info)


@view_contact.route('/friend_link')
def friend_link():
    return render_template('public/style1/about.html')
